<template>
  <div>
    <el-card>
      <RegionSelect v-model="value" @change="handlerChange" />
      <div style="margin: 20px 0">value:{{ value }}</div>
      <div>
        region:
        <pre v-html="JSON.stringify(regions, null, 2)" />
      </div>
    </el-card>
  </div>
</template>
<script setup lang="ts">
import { RegionType } from "@/api/region/type";
import RegionSelect from "@/components/RegionSelect/index.vue";
const value = ref<string[]>(["1", "2", "4"]);
const regions = ref<RegionType[]>([]);
const handlerChange = (region: RegionType[]) => {
  regions.value = region;
};
</script>

<style lang="scss" scoped>
pre {
  height: 60vh;
  overflow-y: scroll;
  background-color: black;
  color: white;
}
</style>
